<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSDN 首页</title>
    <link rel="stylesheet" href="./css/index.css" type="text/css">
    <script src="https://cdn.acwing.com/static/jquery/js/jquery-3.3.1.min.js"></script>
</head>

<body>
    <script type="module">
        import { main } from "./js/search.js";
        main();
    </script>

    <div class="navbar">
        <ul>
            <li><a href="#">首页</a></li>
            <li><a href="./Timeline.html">时间轴</a></li>
            <li><a href="./category.html">分类</a></li>
            <li><a href="./edit-article.html">发布文章</a></li>
            <li><a href="./Avatar.html">个人主页</a></li>
            <li><a href="./about.html">关于</a></li>
            <li><a href="./login.html">登录</a></li>
            <li>
                <div class="search",id="searchPosts">
                    <input type="text" id="searchInput" placeholder="搜索文章..." onkeypress="handleKeyPress(event)">
                    
                    <button id="searchBtn">搜索</button>
                </div>
            </li>
        </ul>
    </div>

    <!-- 获取文章简介 -->
    <script type="module">
        import { main } from "./js/index.js";
       
        let count = 5;  // 需要的文章个数，可有可无
        main(count);
    </script>
    <div class="container"></div>

    <div class="footer">
        <p>&copy; 2024 CSDN. All rights reserved.</p>
    </div>

</body>

</html>